﻿using System;
using CefSharp.WinForms;
using JavaScriptEngineSwitcher.Core;
using JavaScriptEngineSwitcher.V8;

namespace pinduoduo.Util
{
    public class FackUtil
    {
        private FackUtil()
        {
        }

        public static string GetAnti(ChromiumWebBrowser browser, string url)
        {
            using (IJsEngine jsEngine = new V8JsEngine()) {
                string path = AppDomain.CurrentDomain.BaseDirectory + "gl.tmp";
                jsEngine.ExecuteFile(path);
                string rtValue = (string)jsEngine.CallFunction("GetAntiResult", url);
                return rtValue;
            }
        }

    }
}
